package org.ekingstar.webService;

import java.util.List;
import org.ekingstar.qd.domain.QdSimplemeasu;
import org.ekingstar.qd.service.CMeasureService;

import com.ekingstar.framework.util.ServiceLocator;

/**
 * 显示字段设置业务处理webService
 * @author 
 */
public class CMeasureWebService {

	/**
	 * @descripte 根据主题id号查询显示列字段数据信息 
	 * @param strDomainId 主题ID号
	 * @return List
	 */
	public List<QdSimplemeasu> getMeasureList(String strDomainId){
		CMeasureService cMeasureService = (CMeasureService)ServiceLocator.getInstance().getBean("measureService");
		return cMeasureService.getMeasureList(strDomainId);
	}
	
	
	/**
	 * @descripte 新增显示列字段数据，成功返回1，失败返回-1
	 * @param strDomainId 主题ID号
	 * @param strName     字段名称
	 * @param alias       字段别名(可空)
	 * @param strCol      字段     
	 * @param strDescript 描述 
	 * @param nOrderNo    排序号    
	 * @return int
	 */
	public int addMeasure(String strDomainId,String strName,String alias,String strCol,String strDescript,int nOrderNo){
		CMeasureService cMeasureService = (CMeasureService)ServiceLocator.getInstance().getBean("measureService");
		return cMeasureService.addMeasure(strDomainId, strName, alias, strCol, strDescript, nOrderNo);
	}

	
	/**
	 * @descripte 修改显示列数据，成功返回1，失败返回-1
	 * @param MeasureId   显示字段设置ID号
	 * @param strDomainId 主题ID号
	 * @param strName     字段名称
	 * @param alias       字段别名(可空)
	 * @param strCol      字段     
	 * @param strDescript 描述 
	 * @param nOrderNo    排序号    
	 * @return int
	 */
	public int updateMeasure(String MeasureId,String strDomainId,String strName,String alias,String strCol,String strDescript,int nOrderNo){
		CMeasureService cMeasureService = (CMeasureService)ServiceLocator.getInstance().getBean("measureService");
		return cMeasureService.updateMeasure(MeasureId, strDomainId, strName, alias, strCol, strDescript, nOrderNo);
	}
	
	
	/**
	 * @descripte 删除选定的主题配置字段,成功返回1，否则返回-1
	 * @param MeasureId   显示字段设置ID号	   
	 * @return int
	 */
	public int deleteMeasure(String MeasureId){
		CMeasureService cMeasureService = (CMeasureService)ServiceLocator.getInstance().getBean("measureService");
		return cMeasureService.deleteMeasure(MeasureId);
	}
	
	
	/**
	 * @descripte 删除选定的主题配置字段,成功返回1，否则返回-1
	 * @param MeasureId   显示字段设置ID号集	   
	 * @return int
	 */
	public int deleteMeasure(String[] MeasureId){
		CMeasureService cMeasureService = (CMeasureService)ServiceLocator.getInstance().getBean("measureService");
		return cMeasureService.deleteMeasure(MeasureId);
	}
	
	
	/**
	 * @descripte 设置排序号，设置成功返回1，否则返回-1
	 * @param MeasureId   显示字段设置ID号集合
	 * @param nOrderNo    排序号集   
	 * @return int
	 */
	public int setOrderNo(String[] MeasureId,int[] nOrderNo){
		CMeasureService cMeasureService = (CMeasureService)ServiceLocator.getInstance().getBean("measureService");
		return cMeasureService.setOrderNo(MeasureId,nOrderNo);
	}
}
